﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace CjcPhotoPrint
{
	public class Rotate : Transformation
	{
		public Rotate() : base( "Rotate" )
		{
		}

		public override Drawing GetDrawing( Drawing parent )
		{
			var size = RelativeSize( parent.Bounds.Width / parent.Bounds.Height );

			var transform = new TransformGroup();
			transform.Children.Add( new RotateTransform( 90 ) );
			transform.Children.Add( new TranslateTransform( size.Height, 0 ) );

			var group = new DrawingGroup { Transform = transform };
			group.Children.Add( parent );

			return group;
		}
	}
}